
function isEmail(email) {
    if (email != "") {
        alert("邮箱不能为空");
    } else if (email.split("@").length == 1 || email.split(".").length == 1   ) {
        alert("邮箱地址必须包含@和.");
    } else if ( email.indexOf("@")>email.indexOf(".")){
        alert("'.'必须在'@'之后")
    }
    else {
        let arr = email.split("@");
        alert("邮箱地址正确，邮箱名称是：" + arr[0]);
    }
}
